module.exports =
  to1000Hex: (n, split) ->
    s = (""+n).split(".")
    a = s[0] #整数部分
    b = s[1] || "" #小数部分
    c = b ? "." : "" #是否加小数点
    a = ["","00","0"][a.length%3] + a #整数高位补零,位数弄成3的倍数. 
    a.match(/\d{3}/g).join(split || ",").replace(/^0+(\d+)/,"$1") + c + b